<?php
/**
 * Created by PhpStorm.
 * User: dx
 * Date: 16/2/19
 * Time: 下午4:20
 */
class MktCoreInfo extends Eloquent
{
    protected $table = "mkt_core_info";

    /*
     * 1-未开始、2-进行中、3-已结束、4-暂停中、5-全部
     * */
    public static $status = array(
        "1"=>"未开始",
        "2"=>"进行中",
        "3"=>"已结束",
        "4"=>"暂停中",
        //"5"=>"全部",
    );

    /*
     * 3-内推活动、2-普通banner、1-全部
     * */
    public static $type = array(
        //"1"=>"全部",
        "2"=>"普通banner",
        "3"=>"内推活动",
    );

    public static $position = array(
        "1"=>"轮播",
        "2"=>"横幅",
    );

    public function mkt_position()
    {
        return $this->hasOne('MktPosition',"mkt_core_info_id","id");
    }

    public function mkt_rule()
    {
        return $this->hasOne('MktRule',"mkt_core_info_id","id");
    }

}